package ar.edu.unsam.algo3.plantasvszombies.dominio.tst

import ar.edu.unsam.algo3.plantasvszombies.dominio.Zombie
import ar.edu.unsam.algo3.plantasvszombies.homes.HomeZombies
import ar.edu.unsam.algo3.plantasvszombies.ui.ApplicationModels.AlmanaqueAppModel
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.uqbar.commons.utils.ApplicationContext

class TstBuscarZombie {
	AlmanaqueAppModel buscador

	@Before
	def void init() {
		buscador = new AlmanaqueAppModel
		buscador.nombre = "Karateka"
		ApplicationContext::instance.configureSingleton(typeof(Zombie), new HomeZombies)
	}

	@Test
	def void tstBuscarZombie() {
		buscador.buscar
		Assert::assertEquals(2, buscador.result.size)
	}

}
